Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Place footer below main content #4014

Merged
merged 4 commits into from
Mar 25, 2025
Merged

Place footer below main content #4014

merged 4 commits into from
Mar 25, 2025

Conversation

parlough
Copy link
Member

@parlough parlough commented Mar 10, 2025

Update the site's layout implementation so that the main content can scroll with the entire viewport rather than having a separate scroll view. This allows the footer to be placed after the main content rather than fixed at the bottom and better aligns the site's layout with dart.dev and docs.flutter.dev.

  • Don't limit the body to a height of 100%, so that the main content can be scrolled as part of the primary/full viewport. This is what allows the footer to be after the content.
  • Make header sticky so they always remain visible at the top of the viewport.
  • Make sidebars sticky, but below the header, so that they remain visible when scrolling the main content.
  • Remove custom webkit scrollbar styles as they cause part of the header's chrome to go missing and are platform dependent.
    • Add color-scheme: <light or dark> to the theme styles so the browser provides properly themed scrollbars.
    • Removing these styles also resolves a TODO relating to the mobile version of the sidebars.

Resolves #4013

@parlough
Copy link
Member Author

I tested locally with Flutter, Dart, and the testing package. I recommend staging at least testing-package yourself to get a feel of the change:

dart run tool/task.dart serve testing-package

@parlough
Copy link
Member Author

I staged the flutter docs at: https://parlough-api-dart-dev.firebaseapp.com/doc/

@srawlins
Copy link
Member

Sorry for the delay! I meant to try this out earlier.

I just manually tested with the Dart SDK, and looked at your staged launch, @parlough . I think they look great. I'll do a code review.

CC @athomas @gspencergoog if you'd like to see the new positioning of the footer (it's nothing surprising, but it is changed from being fixed position).

Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSS looks fine to me.

@srawlins
Copy link
Member

Thanks @parlough !

@srawlins srawlins merged commit 18a7631 into dart-lang:main Mar 25, 2025
9 checks passed
@gspencergoog
Copy link
Collaborator

Thanks, looks good!

@parlough parlough deleted the fix/4013 branch March 26, 2025 18:05
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Apr 2, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`.

core (https://github.com/dart-lang/core/compare/61e6771..a6e81e0):
  a6e81e0b  2025-03-31  Lasse R.H. Nielsen  Make URL strategy better at recognizing URLs. (dart-lang/core#873)
  379e9c2e  2025-03-25  dependabot[bot]  Bump dart-lang/setup-dart from 1.7.0 to 1.7.1 in the github-actions group (dart-lang/core#869)

dartdoc (https://github.com/dart-lang/dartdoc/compare/d400676..cbc1885):
  cbc18857  2025-03-25  Sam Rawlins  Improve the error message when an import cannot be resolved (dart-lang/dartdoc#4023)
  18a7631d  2025-03-25  Parker Lougheed  Place footer below main content (dart-lang/dartdoc#4014)
  f41bd3ab  2025-03-24  Sam Rawlins  Improve failure when import cannot be found (dart-lang/dartdoc#4022)

ecosystem (https://github.com/dart-lang/ecosystem/compare/2317263..391a80c):
  391a80c  2025-04-01  Brian Wilkerson  Update prompts.dart (dart-lang/ecosystem#349)
  6a89899  2025-04-01  Brian Wilkerson  Update create_tuning_data.dart (dart-lang/ecosystem#350)

http (https://github.com/dart-lang/http/compare/1b6e28d..e988925):
  e988925  2025-03-31  Brian Quinlan  Remove .gitignored files (dart-lang/http#1728)
  29c5733  2025-03-25  Brian Quinlan  Improve the reliability of cronet_http/ok_http workflows (dart-lang/http#1736)
  dd56b86  2025-03-21  Brian Quinlan  Remove cronet_http.impl (dart-lang/http#1734)
  7f5ad18  2025-03-21  Brian Quinlan  Adding missing license headers (dart-lang/http#1735)
  fedead7  2025-03-20  Brian Quinlan  [cronet_http] Prepare to release 1.3.3 (dart-lang/http#1733)

i18n (https://github.com/dart-lang/i18n/compare/d9cce0b..2701040):
  2701040  2025-04-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/i18n#959)
  5101533  2025-04-01  Moritz  Fix hashes.dart formatting (dart-lang/i18n#960)

shelf (https://github.com/dart-lang/shelf/compare/2af8529..082d3ac):
  082d3ac  2025-04-01  dependabot[bot]  Bump actions/cache from 4.2.2 to 4.2.3 in the github-actions group (dart-lang/shelf#475)

test (https://github.com/dart-lang/test/compare/9e349d0..c1fa1e6):
  c1fa1e69  2025-04-01  dependabot[bot]  Bump the github-actions group with 3 updates (dart-lang/test#2476)
  31a2d64c  2025-03-31  Nate Bosch  Sort reporter options (dart-lang/test#2475)

webdev (https://github.com/dart-lang/webdev/compare/302b6db..697f2f7):
  697f2f7f  2025-03-24  Jessy Yameogo  renamed DWDS injector parameter (dart-lang/webdev#2602)
  af33df71  2025-03-21  Tristan Ross  Add offline mode (dart-lang/webdev#2483)
  5c805f14  2025-03-21  Jessy Yameogo  Updated DWDS to include a boolean flag that enables debugging support when set to true (dart-lang/webdev#2601)

Change-Id: I7af88306b77efa3dab2bdef0d7543663317448f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419682
Auto-Submit: Devon Carew <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dart api docs footer should have ability to be dismissed/closed
3 participants